<script>
/**
 * @desc 购买须知
 */

export default {
  name: 'purchase-notice',
  props: { data: String },
  computed: {
    textArr() {
      return this.data ? this.data.split('\n').filter(v => v !== '') : []
    }
  }
}
</script>

<template>
  <div class="purchase-notice">
    <p class="text" v-for="(v,i) in textArr" :key="i">{{v}}</p>
  </div>
</template>

<style lang="scss" scoped>
.purchase-notice {
  background-color: #fff;
  margin: 10px 0;
}
.text {
  padding: 10px;
  word-wrap: break-word;
  font-size: 16px;
}
</style>
